Skip to content

Conversation

@nero120
Copy link
Contributor

@nero120 nero120 commented Feb 10, 2018

Pull request checklist

Description of changes

Updated TextField component so that _adjustInputHeight is called when value is changed via prop update. This ensures the height is adjusted when value updates for a controlled TextField (with multiline and autoAdjustHeight true).

Focus areas to test

(optional)

} as ITextFieldState);
} as ITextFieldState,
() => {
this._adjustInputHeight();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_adjustInputHeight [](start = 15, length = 18)

Can you please add a change file with "patch" for textfield

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run "npm run change" from the root


In reply to: 167708512 [](ancestors = 167708512)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manishgarg1 when I run that command it prints the following:

Starting "rush change"

Target branch is origin/master
No change file is needed.

What should I do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nero120 Try npm run change -- -b upstream/master (rush is comparing your changes to master, but since your changes were committed to your master branch, this will compare it to Fabric's master)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erichdev nope:

ERROR: Command failed: git diff upstream/master... --dirstat=files,0
       fatal: ambiguous argument 'upstream/master...': unknown revision or path not in the working tree.
       Use '--' to separate paths from revisions, like this:
       'git <command> [<revision>...] -- [<file>...]'

I confess to not understanding why this doesn't 'just work', I haven't done anything particularly unique here - doesn't everyone submit a pull request from their fork's master branch?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"upstream" is a remote name. Do you have a git remote pointing to officedev? You can add it like so:

git remote add upstream https://github.com/OfficeDev/office-ui-fabric-react.git

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dzearing, but after running your command then npm run change -- -b upstream/master I get the error:

Starting "rush change"

Target branch is upstream/master
fatal: ambiguous argument 'upstream/master...': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Is there some other way I can create this file or can you accept the pull request without it?

@manishgarg1 manishgarg1 self-assigned this Feb 12, 2018
Copy link
Collaborator

@manishgarg1 manishgarg1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

@manishgarg1 manishgarg1 merged commit da16636 into microsoft:master Feb 14, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Controlled TextField with multiline and autoAdjustHeight does not adjust when setting value via state

4 participants